package com.zxq.ai.domain.user.account;

import com.zxq.ai.domain.ValueObject;
import com.zxq.ai.domain.enums.CashAccountOperateType;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
 * 现金账户操作日志（只会新增，不会更新）
 */
@Setter
@Getter
@NoArgsConstructor
@AllArgsConstructor
public class CashAccountOperateLog implements ValueObject<String> {

    private String logId;      // 操作记录ID
    private String accountId;  // 账户ID

    private CashAccountOperateType operateType; // 操作类型
    private Long operateAmount;       // 操作金额(单位：分)

    private Long balanceAmountBefore;         // 账户余额 balanceAmount = frozenAmount + availableAmount
    private Long balanceAmountAfter;          // 账户余额 balanceAmount = frozenAmount + availableAmount
    private Long frozenAmountBefore;          // 冻结金额
    private Long frozenAmountAfter;           // 冻结金额
    private Long availableAmountBefore;       // 可用余额
    private Long availableAmountAfter;        // 可用余额

    private Long totalRechargeAmountBefore;     // 累计充值金额
    private Long totalRechargeAmountAfter;      // 累计充值金额
    private Long totalWithdrawAmountBefore;     // 累计提现金额
    private Long totalWithdrawAmountAfter;      // 累计提现金额

    private String remark;     // 备注

    private String operateBy;   // 操作人
    private Long operateAt;    // 操作时间

    @Override
    public String id() {
        return logId;
    }


}
